Cipher independent interface for cryptographic hardware service

ABSTRACT

Disclosed is a cipher independent cryptographic hardware service. Cipher independent transactions are received into input slots ( 202 ). The input slots contain FIFOs to hold the transactions. The transactions are converted from cipher independent form to cipher dependent form ( 206 ) and timing as they are removed from the FIFOs. After cryptographic processing by cipher specific hardware, the results are sent to output FIFOs ( 212 ). Multiple FIFOs and cryptographic hardware may be used so that multiple cryptographic functions may be performed in parallel and simultaneously.

CROSS-REFERENCE TO RELATED APPLICATION

This application is based upon and claims the benefit of U.S.provisional application No. 61/155,864, entitled “Cipher IndependentInterface for Cryptographic Hardware Service,” filed Feb. 26, 2009, theentire disclosure of which is herein specifically incorporated byreference for all that it discloses and teaches.

BACKGROUND OF THE INVENTION

Modern application-specific integrated circuits (ASICs) integrategreater and greater functionality. These so-called system-on-a-chipintegrate many components of a computer or other electronic system intoa single integrated circuit. One advantage of system-on-a-chip designsis that they usually consume less power and have a lower cost than themultichip systems they replace. Furthermore, systems-on-a-chip helpreduce overall system production cost because there are fewer packagesin a given system.

Some of the functions integrated into systems-on-a-chip includegraphics, Ethernet media access control layer (MAC), Universal serialbus (USB), memory controllers, and other application-specific logic.Another compute intensive function that may be incorporated into an ASICare hardware cryptographic function blocks. Cryptography modules becomemore and more ubiquitous in modern ASICs for various applications.

Typically, these cryptographic modules supports different standards.They also typically use different interfaces. In particular, thesecryptographic modules often also require very specific and precisetiming schedule for input/output information.

SUMMARY OF THE INVENTION

An embodiment of the invention may therefore comprise a cryptographichardware system, comprising: a plurality of input slots that receivecipher independent cryptographic transactions; a first wrapped cipherblock that includes first cipher hardware that receives cipherindependent cryptographic transactions and sends first cipher dependenttransactions to said first cipher hardware, the first wrapped cipherblock translating said cipher independent cryptographic transactions tosaid first cipher dependent transactions and translates first cipherdependent result transactions received from said first cipher hardwareto cipher independent result transactions; and, a first output FIFOhaving a plurality of slots that receive said cipher independent resulttransactions associated with said first wrapped cipher block.

An embodiment of the invention may therefore further comprise a methodof providing cryptographic services, comprising: receiving cipherindependent cryptographic transactions; receiving said cipherindependent cryptographic transactions into a first wrapped cipher blockthat includes first cipher hardware; translating said cipher independentcryptographic transactions to first cipher dependent transactions;sending first cipher dependent transactions to said first cipherhardware; translating first cipher dependent result transactionsreceived from said first cipher hardware to cipher independent resulttransactions; and, receiving said cipher independent result transactionsinto a first output FIFO.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of a cryptographic hardware system.

FIG. 2 is a flowchart of a method of providing cryptographic hardwareservices.

FIG. 3 is a flowchart of a method of operating a cryptographic hardwaresystem.

FIG. 4 is an illustration deriving a timing independent transaction inSuper Language from a cipher specific transaction format and timing.

FIG. 5 illustrates an example Super Language bit level description forinput FIFOs.

FIG. 6 illustrates an example Super Language bit level description foroutput FIFOs.

DETAILED DESCRIPTION OF THE EMBODIMENTS

FIG. 1 is a block diagram of a cryptographic hardware system.Cryptographic hardware 100 comprises input slot 110, input slot 111,input slot 112, input switch 115, dispatch 120, wrapped cipher block130, wrapped cipher block 131, output switch 140, output FIFO 150,output FIFO 151, and output FIFO 152. Wrapped cipher block 130 includesinput translator 130-1, cipher hardware 130-2, output translator 130-3,and control 130-4. Wrapped cipher block 131 includes input translator131-1, cipher hardware 131-2, output translator 131-3, and control131-4. Each of the elements of cryptographic hardware 100 operativelycoupled to each of the other elements of cryptographic hardware 100.

As shown in FIG. 1, input slots 110-112 are operatively coupled to asystem for receiving commands and data. Input slots 110-112 areoperatively coupled to dispatch 120. Input slots 110-112 are operativelycoupled to input switch 115. Input switch 115 is operatively coupled todispatch 120. Input switch 115 is operatively coupled to wrapped cipherblock 130 and wrapped cipher block 131. In particular, input switch 115is operatively coupled input translator 130-1 and input translator131-1. Thus, cryptographic transactions placed in input slots 110-112may be routed to wrapped cipher block 130, wrapped cipher block 131, oradditional wrapped cipher blocks (not shown). In an embodiment, inputswitch 115 may be a crosspoint switch or other N×M port routing device,where N is a number of input ports and M is a number of output ports. Nwould typically correspond to the number of inputs slots 110-112. Mwould typically correspond to the number of wrapped cipher blocks130-131.

Output FIFO's 150-152 are operatively coupled to a system for sendingresults and/or other messages. Output FIFO's 150-152 are operativelycoupled to output switch 140. Output FIFO's 150-152 are operativelycoupled to dispatch 120. Output switch 140 is operatively coupled todispatch 120. Wrapped cipher blocks 130-131 are operatively coupled tooutput switch 140. In particular, output switch 140 operatively coupledto output translator 130-3 and output translator 131-3. Thus,cryptographic result transactions produced by wrapped cipher block130-131 may be routed to any of output FIFO's 150-152. In an embodiment,output switch 140 may be a crosspoint switch or other M×Q port routingdevice, where M is a number of input ports and Q is a number of outputports. M would typically correspond to the number of wrapped cipherblocks 130-131. Q would typically correspond to the number of outputFIFOs 150-152.

Input translator 130-1 is operatively coupled to cipher hardware 130-2.Cipher hardware 130-2 is operatively coupled to output translator 130-3.Input translator 130-1, cipher hardware 130-2, and output translator130-3 all are operatively coupled to control 130-4. Thus, control 130-4may manage the operation and data input and output of input translator130-1, cipher hardware 130-2, and output translator 130-3. Control 130-4and input translator 130-1 may cooperate to sends cipher dependenttransactions to cipher hardware 130-2 using cipher dependent timing. Inother words, control 130-4 and input translator 130-1 may cooperate tosend data and control signals to cipher hardware 130-2 in a form, andwith the timing, required by cipher hardware 130-2.

Input translator 131-1 is operatively coupled to cipher hardware 131-2.Cipher hardware 131-2 is operatively coupled to output translator 131-3.Input translator 131-1, cipher hardware 131-2, and output translator131-3 all are operatively coupled to control 131-4. Thus, control 131-4may manage the operation and data input and output of input translator131-1, cipher hardware 131-2, and output translator 131-3. Control 131-4and input translator 131-1 may cooperate to sends cipher dependenttransactions to cipher hardware 131-2 using cipher dependent timing. Inother words, control 131-4 and input translator 131-1 may cooperate tosend data and control signals to cipher hardware 131-2 in a form, andwith the timing, required by cipher hardware 131-2.

In an embodiment, input slots 110-112 may contain input FIFO's. Theseinput FIFO's may receive cipher independent cryptographic transactionsfrom a system. In addition, input slots 110-112 may receive and/orcompute a priority for not yet started cryptographic transactions.Because there are a plurality of input slots 110-112, multiple wrappedcipher blocks 130-131 may be accessed in parallel and independently. Thenumber of multiple transactions that may be performed in parallel andindependently is limited by the number of FIFO's in input slots 110-112and the number of wrapped cipher blocks 130-131. Thus, wrapped cipherblock 130 may be receiving and processing cipher independentcryptographic transactions from input slot 110 at the same time wrappedcipher block 131 is receiving and processing cipher independentcryptographic transactions from input slot 112.

Dispatch 120 may know which wrapped cipher blocks 130-131 and whichoutput FIFO's 150-152 are in use. Dispatch 120 may know thecorrespondence between input slots 110-112, wrapped cipher blocks130-131, and output FIFO's 150-152. Thus, dispatch 120 may control inputswitch 115 and output switch 140. Dispatch 120 may observe input slots110-112 to choose cryptographic transactions to start and also allocateoutput FIFO's 150-152 to receive cryptographic result transactions.

Input switch 115 provides connections between input slots 110-112 andwrapped cipher block 130-131. Input switch 115 may also receive statussignals from the wrapped cipher blocks 130-131. For example, inputswitch 115 may receive transaction complete indicators from control130-4 and control 131-4. In response, input switch 115 may sendindicators to dispatch 120 that an input slots 110-112 may be reused.

Wrapped cipher blocks 130-131 may be developed individually for eachparticular cipher hardware 130-2 and 131-2. Wrapped cipher blocks130-131 provide a uniform data and signal interface. This uniform dataand signal interface may comprise standard FIFO-like interfaces on bothinput and output. The standard interfaces allow cipher independentcryptographic transactions to be placed in input slots 110-112, androuted to wrapped cipher blocks 130-131, independent of the underlyingcipher hardware 130-2 and 131-2 that determine the cipher function(i.e., cryptographic code) performed by wrapped cipher block 130-131.

In an embodiment, the underlying cipher hardware 130-2 and 131-2 mayimplement different ciphers or the same cipher. In addition, cipherhardware 130-2 and 131-2 may have different timing requirements.However, the FIFO's in input slots 110-112, and output FIFO's 150-152,allow cipher independent cryptographic transactions and cipherindependent result transactions to be written to, and read from, inputslots 110-112 and output FIFO's 150-152, respectively, independent ofthe input and timing requirements of cipher hardware 130-2 in 131-2.

Control 130-4 and 131-4 control cipher hardware 130-2 in 131-2,respectively. Control 130-4 and 131-4 also control input translator is130-1 in 131-1 to process cipher independent cryptographic transactionsinto a form and timing that cipher hardware 130-2 and 131-2 mayunderstand. Control 130-4 and 131-4 also control output translator is130-3 in 131-3 to process cipher dependent results received from cipherhardware 130-2 and 131-2 into a cipher independent form and timing thatoutput FIFO is 150-152 and the rest of the system may understand.

Input switch 140 provides connections between output FIFO's 150-152 andwrapped cipher blocks 130-131. Output FIFO's 150-152 accept cipherindependent result transactions from wrapped cipher blocks 130-131 viaoutput switch 140. Output FIFO's 150-152 may also provide an indicationthat they are full or nearly full. This indication may be relayed byoutput switch 142 to wrapped cipher blocks 130-131. This indication maystop cipher hardware 130-2 and 131-2 from running. By stopping cipherhardware 130-2 in 131-2 output FIFO's 150-152 are prevented fromoverflowing.

The aforementioned cryptographic hardware 100 provides multiple I/Ochannels that can run multiple cryptographic transactions concurrently.By using FIFO-based input slots 110-112 which receive cipher independentcryptographic transactions, detailed time scheduling and data formattingis not necessary. The cipher independent cryptographic transactionsprovide a uniform interface for all ciphers and cipher hardware 130-2and 131-2. Thus, while input slot 110 is providing cipher independentcryptographic transactions to wrapped cipher block 130 and the resultsare being placed in output FIFO 150, input slot 111 may simultaneouslybe providing cipher independent cryptographic transactions to wrappedcipher block 131 and the results be placed in output FIFO 152. In anembodiment, that uniform interface may comprise 8-bits of control and64-bits of data.

Cryptographic hardware 100 provides a uniform interface across the setof attached cipher blocks, the parameters of each individual cipher,number of input/output channels, the sizes of the FIFO's, and thetopology between ciphers and FIFO's (i.e., dedicated/shared/mixedconnections). In addition, the cipher independent cryptographictransactions may be expressed in either binary or mnemonic languages.The proposed architecture and technical solution suppose to be veryconvenient and flexible, and also easy for integration.

It should be noted that there are only a few such cryptographic modulesthat provide combined crypto service fully in hardware available inindustry. In combination with highly competitive crypto library blocks,cryptographic hardware 100 allows momentum momentum to be gained forgrowing data protection market wins and security demands for variousapplications, both existing and planned for development.

The architecture of cryptographic hardware 100 supports of drop-insolution for cipher blocks. Dispatcher 120 is allows flexible multistream input/output channels for concurrent transaction. Dispatcher 120supports and handles transaction priorities, deadlock handling,multithreading, and cancelling.

Development of the complex structure of cryptographic hardware 100 mayrequire elaborating of the comprehensive debugging and testing system.Thus, built-in testing, debugging support, error detecting, and errorrecovering capabilities are provided.

The architecture and hardware implementation of proposed Cryptographichardware 100 provides multiple and combined crypto service for varioushardware and/or firmware applications/protocols. Supported cryptoservices can be conveniently and easily expressed in a unified SuperLanguage by means of so called Playing cards. Playing cards areessentially convenient templates for the crypto job descriptions.

An example of cipher independent cryptographic transactions that may beused to drive cipher hardware 100 implementing the AES cipher in theGalois Counter mode (GCM) mode is given in Table 1. This is an exampleof the data that may be received by input translators 130-1 and 131-1.Note that in Table 1, each semicolon (“;”) indicates a clock cycle.Thus, for example, between the BEGIN_TRANS and first SEND_KEY_(—)0transaction there is only 1 clock cycle.

TABLE 1 // 7e0306 (hex) is a randomly assigned transaction ID // 17(hex) means “it's a GCM-AES transaction” // (codes are defined/allocatedduring netlist generation) // c (hex) means “authenticated encryption”BEGIN_TRANS ID = 0x7e0306 SCENARIO = 0x17 PARAMETERS = 0xc ; // 128-bitkey requires two 64-bit data blocks; // the last one is marked as LAST=1 SEND_KEY_0 DATA = 0xfeffe9928665731c ;  SEND_KEY_0 DATA =0x6d6a8f9467308308 LAST = 1 ; // 96-bit IV also requires two 64-bit datablocks: one full block // and one partial block (AUX=4 means “its sizeis 4 bytes”) // CFU/CSE ignores the padding bits (00000001), // thusthey might be randomly set  SEND_IV_0 DATA = 0xcafebabefacedbad ; SEND_IV_0 DATA = 0xdecaf88800000001 LAST = 1 AUX = 4 ; // opcodeSEND_DATA_0 means “AAD” // 96-bit AAD also requires two 64-bit datablocks: one full block // and one partial block (AUX=4 means “its sizeis 4 bytes”) // CFU/CSE ignores the padding bits (f7fe6eaf), // thusthey might be randomly set  SEND_DATA_0 DATA = 0x0060addad2f34f7d ; SEND_DATA_0 DATA = 0x12ef2fddf7fe6eaf LAST = 1 AUX = 4 ; // opcodeSEND_DATA_1 means “payload data” // 192-bit payload data requires threefull 64-bit data blocks  SEND_DATA_1 DATA = 0x09313225f88406e5 ; SEND_DATA_1 DATA = 0xa55909c5aff50000 ;  SEND_DATA_1 DATA =0x00c0b16aedf5aa0d LAST = 1 ; // value 7e0306 (hex) must match one fromBEGIN_TRANS END_TRANS ID = 0x7e0306 ;

An example of cipher dependent transactions (in mnemonic form) to drivecipher hardware that implements the AES cipher in the Galois Countermode (GCM) mode is given in Table 2. This is an example of the data thatmay be received by cipher hardware 130-2 and 131-2 after the cipherindependent cryptographic transactions are translated by inputtranslators 130-1 and 131-1. Note that in Table 2, each semicolon “;”indicates a clock cycle. Thus, for example, between the save_key andfirst make_mask transaction there are 15 clock cycles. Accordingly, thetranslation performed by input translators 130-1 and 131-1 operates totranslate in both bit format and time. Likewise, output translators130-3 and 131-3 may operate to translate the outputs of cipher hardware130-2 and 131-2 in both bit format and time.

TABLE 2 SAVE_KEY K_ID 2 KEY_TYPE 1 KEY <~0xfeffe9928665731c6d6a8f9467308308 ;;;;;;;;;;;;;;; MAKE_MASK K_ID 2 T_ID4 GCM_INIT_H DATA = 0x00112233445566778899aabbccddeeff ;;;;;;;;;;;;;;;MAKE_MASK K_ID 2 T_ID 4 GCM_LOAD_IV DATA =0xcafebabefacedbaddecaf88800000001 ;;;;;;;;;;;;;;; MAKE_MASK K_ID 2 T_ID4 GCM_LOAD_LEN DATA ~ 0x000000000000006000000000000000c0 ;;;;;;;;;;;;;;;MAKE_MASK K_ID 2 T_ID 4 GCM_AAD_INCOMPLETE DATA ~0x0060addad2f34f7d12ef2fddf7fe6eaf ;;;;;;;;;;;;;;; ENCRYPT K_ID 2 T_ID 4GCM_ENC DATA ~ 0x09313225f88406e5a55909c5aff50000 ;;;;;;;;;;;;;;;ENCRYPT K_ID 2 T_ID 4 GCM_ENC_INCOMPLETE DATA ~0x00c0b16aedf5aa0de657ba637b39e21f ;;;;;;;;;;;;;;; MAKE_MASK K_ID 2 T_ID4 GCM_TAG_FROM_REG DATA ~ 0x0060bbbbbbbbbbbbbbbbbbbbbbbb00c0;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;

FIG. 2 is a flowchart of a method of providing hardware cryptographicservices. The steps shown in FIG. 2 may be performed by one or moreelements of cryptographic hardware 100. Cipher independent cryptographictransactions are received (202). For example, input slot 110 may receivecipher independent cryptographic transactions. Input slot 110 mayreceive the cipher independent cryptographic transactions into a FIFO.The cipher independent cryptographic transactions are received into awrapped cipher block that includes cipher hardware (204). For example,wrapped cipher block 130 may receive, via input switch 115, cipherindependent cryptographic transactions from input slot 110. Wrappedcipher block 130 may include cipher hardware 130-2.

The cipher independent cryptographic transactions are translated tocipher dependent transactions (206). For example, input translator 130-1make translate cipher independent cryptographic transactions into cipherdependent transactions suitable for cipher hardware 130-2. In anembodiment, this translation from cipher independent cryptographictransactions to cipher dependent cryptographic transactions may includetranslation of the form, format, bit-ordering, command sequence, and/ortiming. In other words, input translator 130-1 implement any foam ofstate machine or other logic to convert cipher independent cryptographictransactions stored in, and received from, input slot 110 into theappropriate data and control signals to drive cipher hardware 130-2.

Cipher dependent transactions are sent to the cipher hardware (208). Forexample, cipher dependent transactions from input translator 130-1 andcontrol signals from control 130-4 may be sent to cipher hardware 130-2.These cipher dependent transactions and control signals may cause thecipher hardware to perform its cipher functions. These cipher functionsmay cause the cipher hardware to produce cipher dependent results. Thesecipher dependent results may include, or be, cipher dependent resulttransactions and/or control signals.

Cipher dependent result transactions received from cipher hardware aretranslated to cipher independent result transactions (210). For example,output translator 130-3 may translate cipher dependent resulttransactions received from cipher hardware 130-2 into cipher independentresult transactions. Cipher independent result transactions are receivedinto an output FIFO (212). For example, output FIFO 150 may receive fromoutput translator 130-3, via output switch 140, cipher independentresult transactions.

FIG. 3 is a flowchart of a method of operating a cryptographic hardwaresystem. The steps illustrated in FIG. 3 may be performed by one or moreelements of cryptographic hardware 100. A job request is placed into aninput slot (302). For example, a cipher independent job request may beplaced into input slot 110. A dispatch unit receives a begin label and acurrent priority (304). For example, dispatch 120 may receive a beginsignal and an indicator of priority from input slot 110.

The dispatch unit configures input and output switches (306). Forexample, dispatch 120 may configure input switch 115 to route cipherindependent cryptographic transactions from input slot 110 to wrappedcipher block 130. Dispatch 120 may configure output switch 140 routecipher independent result transactions from wrapped cipher block 130 tooutput FIFO 150.

Wrapped cipher block control receives a start signal (308). For example,control 130-4 may receive a “begin” transaction which it will interpretas a start signal. An input translator converts receives cipherindependent transactions to cipher dependent transactions and sends themto cipher hardware (310). For example, control 130-4 may send readrequests to input slot 110. This may cause cipher independentcryptographic transactions to be sent from input slot 110 inputtranslator 130-1. Input translator 130-1, in turn, converts the receivedcipher independent transactions to cipher dependent transactions. Thecipher dependent transactions and/or control signals may be sent tocipher hardware 130-2.

Cipher hardware performs a cipher function (312). For example, cipherhardware 130-2 may perform a cipher function. In an example, cipherhardware may perform AES, TDES, Kasumi, SHA, RSA/ECC or another cipherfunction. An output translator converts received cipher dependenttransactions to cipher independent transactions and sends them to anoutput FIFO (314). For example, output translator 130-3 may convertcipher dependent result transactions and/or control signals receivedfrom cipher hardware 130-2 to cipher independent result transactions.These cipher independent result transactions may be sent to output FIFO150 via output switch 140.

Cipher hardware sends a done signal (316). For example, cipher hardware130-2 may send a cipher dependent transaction or a control signalindicating it is done. The dispatch unit disconnects the input andoutput switches (318). For example, dispatch 120 may instruct inputswitch 115 to disconnect input slot 110 from wrapped cipher block 130.Dispatch 120 may also instruct output switch 140 to disconnect wrappedcipher block 130 from output FIFO 150. In an embodiment, there may betwo indicators sent to dispatch 120. A first indicator would be sentwhen the last of the cipher independent cryptographic transactions issent to the input translator. At that point dispatch 120 may release theinput slot to receive more cipher independent cryptographictransactions. The second indicator would be sent when the last cipherindependent result transactions exits the output translator.

In an embodiment, transactions related to particular Cipher/Hasher arecompliant with a supported Playing Card. Mismatches cause an error. Inother words, control 130-4 or 131-4 will go to an error state (ERR) andan ERROR output signal may be issued. To resume functioning from theerror state, a CANCEL input signal needs to be sent. This causescryptographic hardware 100 to do the following: (1) remove the rest ofcurrent transaction data from input FIFO in input slots 110-112; (2)send a “break/cancel” combination (e.g., ENABLE=1, VALID=0, START=1) tothe wrapped cipher block 130-131. The wrapped cipher block 130-131 (1)sends ERR_END_TRANS block into an output FIFO 150-152 and issuesDONE_WRITE signal; (2) sets Cipher hardware 130-2 131-2 to an initialstate where it is ready to start processing new transactions; (3)changes the internal state of control 130-4 131-4 to its initial state.

Individual cipher hardware units may use very complicated I/O interfaceformats and timing schedules. An example of this is given in the firstcolumn of Table 3. In an embodiment, the data flow is described in termsof 64-bit blocks sent via FIFOs without a timing schedule. These may beformatted in a markup language via 8-bit control signals that containopcodes and a few flags (e.g., last={0,1} or size={1 . . . 8}). Examplesof this markup for input and output FIFOs are given in the third andfourth columns of Table 3.

TABLE 3 Cipher Specific Interface Timing and Format Input FIFO FlowOutput FIFO Flow @ T₁: send 256-bit key to port KEY BEGIN_TRANSBEGIN_TRANS @ T₂ T₁ + 2: send 96-bit initial value SAVE_KEY (last=0,RESULT (last=0, data=   to port IV   data=key[255:192])   out₁[127:64])@ T₃ T₂ + 43: send the first 128-bit SAVE_KEY (last=0, RESULT (last=0,data=out₁[63:0])   block of payload data to port   data=key[191:128])RESULT (last=0, data=   DATA_IN SAVE_KEY (last=0,   out₂[127:64]) @ T₄(where T₄ = T₃ + 2, T₃ + 4, T₃ + 6, . . . ,   data=key[127:64]) RESULT(last=0, data=out₂[63:0])   T₃ + 40, or at any moment after SAVE_KEY(last=1, data=key[63:0]) ...   T₃ + 42), send the second 128- LOAD_IV(last=0, data=iv[95:32], RESULT (last=0, data=   bit block of payloaddata to   size=8)   out_(N)[127:64])   port DATA_IN LOAD_IV (last=1,data=iv[31:0], RESULT (last=1, data=out_(N)[63:0]) . . .   size=4) HASH(last=0, data=hash[159:96], @ T_(N) (where T_(N) = T_(N−1) + 2,T_(N−1) + 4, T_(N−1) + ENCRYPT (last=0,   size=8)   6, . . . , T_(N−1) +40, or any T_(N) T_(N−1) +   data=in1[127:64]) HASH (last=0,data=hash[95:32],   42), send the last 128-bit ENCRYPT (last=0,data=in1[63:0])   size=8)   block of payload data to port ENCRYPT(last=0, HASH (last=1, data=hash[31:0].   DATA_IN, and set a signal  data=in2[127:64])   size=4)   indicating that it is the last ENCRYPT(last=0, data=in2[63:0]) END_TRANS   block . . . @ T3 + 39, T4 + 39, . .. , TN + 39: read ENCRYPT (last=0,   processed 128-bit blocks from  data=inN[127:64])   port DATA_OUT ENCRYPT (last=1, data=inN[63:0]) @TN + 43: read 160-bit hash from END_TRANS   port HASH_OUT

In Table 3, BEGIN_TRANS and END_TRANS (and their error variants) are twospecial commands “wrapping” the transaction and defining it in generalterms. These transactions may have the following arguments: (1) Id—auser-defined integer associated with particular transaction; (2)priority—a user-defined integer assigned to the transaction; (3)scenario—predefined integer defining the cipher; (4)parameters—predefined integer (or set of control bits) specifyingparticular mode of the cipher (e.g. encryption vs. decryption mode, mustTAG be generated etc.)

In an embodiment, a cipher's input data of all types are split into64-bit blocks. These blocks may be organized in 3 types of sections: (1)SEND_KEY sections; (2) SEND_IV sections; (3) SEND_DATA sections. Eachtype may be represented by 4 individual variants. These may be used whenspecifying, for example, master key and secondary key. For example,Example of thes variants are: (1) SEND_KEY_(—)0 section; (2)SEND_KEY_(—)1 section; (3) SEND_KEY_(—)2 section; and, (4) SEND_KEY_(—)3section.

To encode these sections/variants, we use the 4 least significant bitsof an 8-bit command bus: opcode=COMMAND[3:0] (codes for BEGIN_TRANS andEND_TRANS may share the same code space). The sets of sections and theorder of sections are scenario-dependent. Typically, the scenariostrictly specifies both set and order of sections used. The last commandin each section may be marked by a special flag as “last=1” whereas allother commands must have “last=0”. The “last” bit is COMMAND[4]. Thethree most significant bits named “aux” (aux=COMMAND[7:5]) can be usedfor coding length. For example, when sending incomplete data blocks, inbyte granularity, 0 means complete 8-byte data, n, where n=1, 2, . . . ,7, means n-byte incomplete data. By default, these may be the mostsignificant bytes.

FIG. 4 is an illustration deriving a timing independent transaction inSuper Language from a cipher specific transaction format and timing. InFIG. 4, a command flow state diagram is derived from cipher specifictransaction format and timing. A control state diagram is derived fromthe command flow state diagram. Finally, a timing independenttransaction in Super Language (“playing card”) is derived from the flowstate diagram.

FIG. 5 illustrates an example Super Language bit level description forthe FIFOs of input slots 110-112. In FIG. 5, for BEGIN_ERR_TRAN andBEGIN_TRAN, the three least significant bits (LSBs), denoted XXX areunused. The most significant bit, denoted E, is set to 1 forBEGIN_ERR_TRAN. The opcode for BEGIN_ERR_TRAN and BEGIN_TRAN is 0001.The opcodes for SEND_KEY_NN, SEND_IV_NN, and SEND_DATA_NN are 01NN,10NN, and 11NN, respectively. NN denotes 0, 1, 2, or 3 in binary. Thus,for example, SEND_DATA_(—)01 would be 1101. The L bit represents the“last” flag. SSS denotes three bits that may be used for incomplete datalength encoding. The opcodes for END_TRAN, and END_ERR_TRAN is 0010. TheE bit (error flag) is set to 0 for END_TRAN and 1 for END_ERR_TRAN.

FIG. 6 illustrates an example Super Language bit level description foroutput FIFOs 150-152. In FIG. 6, for BEGIN_ERR_TRAN and BEGIN_TRAN, thethree least significant bits (LSBs), denoted XXX are unused. The mostsignificant bit, denoted E, is set to 1 for BEGIN_ERR_TRAN. The opcodefor BEGIN_ERR_TRAN and BEGIN_TRAN is 0001. The opcodes for RESULT andTAG are 11ZZ and 10ZZ, respectively. ZZ denotes 0, 1, 2, or 3 in binary.Together with the first two bits of the opcode, the ZZ bits denote ablock type (e.g., result, tag, hash, etc.) The L bit represents the“last” flag. SSS denotes three bits that may be used for incomplete datalength encoding. The opcode for END_TRAN, and END_ERR_TRAN is 0010. TheE bit (error flag) is set to 0 for END_TRAN and 1 for END_ERR_TRAN.

To further illustrate the concepts of the Super Language, Palying Cards,and the operation of cryptographic hardware 100, the following gives asample GCM-AES transaction in three different forms: (a) in“mathematical” language, i.e. in terms of the GCM-AES standard; (b) in“native” mnemonical format of protocol for GCM-AES core; (c) in SuperLanguage mnemonical format of the corresponding transaction for GCM-AEScryptographic functional unit (CFU). These transactions are shown inTables 4, 5, and 6, respectively. A difference to note between (b) and(c) is that in (b), the protocol is clock accurate, and “;” indicates“new clock cycle”. In other words, the first MAKE_MASK must be sentexactly 15 clock cycles after SAVE_KEY. In (c), “;” is just a separatorof data blocks, and the data blocks can be pushed to/popped fromFIFO-like interfaces at random clock cycles. This difference is alsoillustrated in FIG. 5 and Table 3.

GCM-AES cipher's example input parameters and variables are given inTable 4.

TABLE 4 operation = authenticated encryption key length len(K) = 128(decimal) key K = feffe9928665731c6d6a8f9467308308 (hexadecimal)initialization vector length len(IV) = 96 (decimal) = 60 (hexadecimal)initialization vector IV = cafebabefacedbaddecaf888 (hexadecimal)additional authenticated data (AAD) length len(A) = 96 (decimal) = 60(hexadecimal) additional authenticated data A = 0060addad2f34f7d12ef2fdd(hexadecimal) plaintext length len(P) = 192 (decimal) = c0 (hexadecimal)plaintext P = 09313225f88406e5a55909c5aff5000000c0b16aedf5aa0d(hexadecimal)

The same information in “native” mnemonical format organized as GCM-AEScore protocol is shown in Table 5.

TABLE 5 SAVE_KEY K_ID 2 KEY_TYPE 1 KEY <~0xfeffe9928665731c6d6a8f9467308308 ;;;;;;;;;;;;;;; MAKE_MASK K_ID 2 T_ID4 GCM_INIT_H DATA = 0x00112233445566778899aabbccddeeff ;;;;;;;;;;;;;;;MAKE_MASK K_ID 2 T_ID 4 GCM_LOAD_IV DATA =0xcafebabefacedbaddecaf88800000001 ;;;;;;;;;;;;;;; MAKE_MASK K_ID 2 T_ID4 GCM_LOAD_LEN DATA ~ 0x000000000000006000000000000000c0 ;;;;;;;;;;;;;;;MAKE_MASK K_ID 2 T_ID 4 GCM_AAD_INCOMPLETE DATA ~0x0060addad2f34f7d12ef2fddf7fe6eaf ;;;;;;;;;;;;;;; ENCRYPT K_ID 2 T_ID 4GCM_ENC DATA ~ 0x09313225f88406e5a55909c5aff50000 ;;;;;;;;;;;;;;;ENCRYPT K_ID 2 T_ID 4 GCM_ENC_INCOMPLETE DATA ~0x00c0b16aedf5aa0de657ba637b39e21f ;;;;;;;;;;;;;;; MAKE_MASK K_ID 2 T_ID4 GCM_TAG_FROM_REG DATA ~ 0x0060bbbbbbbbbbbbbbbbbbbbbbbb00c0;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;

The same information organized as GCM-AES CFU transaction, in SuperLanguage mnemonical format is shown in Table 6.

TABLE 6 // 7e0306 (hex) is a randomly assigned transaction ID // 17(hex) means “it's a GCM-AES transation” // (codes are defined/allocatedduring netlist generation) // c (hex) means “authenticated encryption”BEGIN_TRANS ID = 0x7e0306 SCENARIO = 0x17 PARAMETERS = 0xc ; // 128-bitkey requires two 64-bit data blocks; // the last one is marked as LAST=1SEND_KEY_0 DATA = 0xfeffe9928665731c ; SEND_KEY_0 DATA =0x6d6a8f9467308308 LAST = 1 ; // 96-bit IV also requires two 64-bit datablocks: one full block // and one partial block (AUX=4 means “its sizeis 4 bytes”) // CFU/CSE ignores the padding bits (00000001), // thusthey might be randomly set SEND_IV_0 DATA = 0xcafebabefacedbad ;SEND_IV_0 DATA = 0xdecaf88800000001 LAST = 1 AUX = 4 ; // opcodeSEND_DATA_0 means “AAD” // 96-bit AAD also requires two 64-bit datablocks: one full block // and one partial block (AUX=4 means “its sizeis 4 bytes”) // CFU/CSE ignores the padding bits (f7fe6eaf), // thusthey might be randomly set SEND_DATA_0 DATA = 0x0060addad2f34f7d ;SEND_DATA_0 DATA = 0x12ef2fddf7fe6eaf LAST = 1 AUX = 4 ; // opcodeSEND_DATA_1 means “payload data” // 192-bit payload data requires threefull 64-bit data blocks SEND_DATA_1 DATA = 0x09313225f88406e5 ;SEND_DATA_1 DATA = 0xa55909c5aff50000 ; SEND_DATA_1 DATA =0x00c0b16aedf5aa0d LAST = 1 ; // value 7e0306 (hex) must match one fromBEGIN_TRANS END_TRANS ID = 0x7e0306 ;

Table 7 gives an example playing card for GCM-AES/GMAC.

TABLE 7 Structure: ** Input:  1. BEGIN_TRANS  2. KEY SECTION  3. IVSECTION  4. AAD SECTION  5. DATA SECTION  6. END_TRANS ** Output (forcorrect transactions):  7. BEGIN_TRANS  8. AAD-RES SECTION  9. RESULTSECTION 10. TAG SECTION 11. END_TRANS ** Output for incorrecttransactions 12. ERR_END_TRANS Each Super Language line defines valuesof:  on input side: Command Bus (cmd[7:0]) and Data Bus (data[63:0])  onoutput side: Status Bus (status[7:0]) and Result Bus (res[63:0])================== === INPUT SIDE === ================== 1. BEGIN_TRANS[1 line] ============== cmd = 8′b00000001 // BEGIN_TRANS data = {label[23:0], priority[7:0], prms[15:0], scenario[15:0] } where:  label:any value (transaction ID)  priority: any value  prms: prms[0] = 0:encryption mode prms[0] = 1: decryption mode prms[1] = 0: do not sendAAD to output prms[1] = 1: send AAD to output prms[2] = 0: do not senden/decrypted payload to output prms[2] = 1: send en/decrypted payload tooutput prms[3] = 0: do not produce hash prms[3] = 1: produce hashprms[15:4]: ignored  scenario: a pre-defined constant 2. KEY SECTION [2or 4 lines] ============== (Note: bit ordering-Bit 0 at the rigthmostposition to match GCM testcases.) 2.1. for 128-bit key line 1: cmd =8′b00000100 // SEND_KEY_0, last=0 data = key[127:64] line 2: cmd =8′b00010100 // SEND_KEY_0 , last=1 data = key[63:0] 2.2. for 256-bit keyline 1: cmd = 8′b00000100 // SEND_KEY_0, last=0 data = key [255:192]line 2: cmd = 8′b00000100 // SEND_KEY_0, last=0 data = key [191:128]line 3: cmd = 8′b00000100 // SEND_KEY_0, last=0 data = key[127:64] line4: cmd = 8′b00010100 // SEND_KEY_0, last=1 data = key [63:0] 3. IVSECTION [2 lines] ============= (Note: bit ordering-- bit 0 at therightmost position to match GCM testcases.) line 1: cmd = 8′b00001000 //SEND_IV_0 , last=0, aux=0 data = IV[95:32] line 2: cmd = 8′b10011000 //SEND_IV_0 , last=1, aux=4 data = { IV [31:0], padding [31:0] } where IV= { Salt [31:0], InitializationVector[63:0] } // TBD (see RFC 4106, page4) padding: any values (will be ignored) 4. AAD SECTION [variable numberof lines, 0 is also possible] ============== (Note: bit ordering--Bit 0at the rightmost position to match GCM testcases.) lines 1 to (last−1):cmd = 8′b00001100 // SEND_DATA_0, last=0, aux=0 data = (64 bits) lastline (64-bit case): cmd = 8′b00011100 // SEND_DATA_0, last=1, aux=0 data= (64 bits) last line (8 to 56 bit cases): cmd = { len[2:0], 5′b11100 }// SEND_DATA_0, last=1, aux=len data = (8*len bits) // len=1...7,padding TBD (recently : // any values at the rightmost, i.e. // leastsignificant bits) 5. DATA SECTION [variable number of lines, 0 is alsopossible] =============== (Note: bit ordering--Bit 0 at the rightmostposition to match GCM testcases.) lines 1 to (last−1): cmd = 8′b00001101// SEND_DATA_1, last=0, aux=0 data = (64 bits) last line (64-bit case):cmd = 8′b00011101 // SEND_DATA_1, last=1, aux=0 data = (64 bits) lastline (8 to 56 bit cases): cmd = { len[2:0], 5′b11101 } // SEND_DATA_1,last=1, aux=len data = (8*len bits) // len=1...7 6. END_TRANS [1 line]============ cmd = 8′b00000010 // END_TRANS data = { label[23:0],padding[39:0] } where:  label: the same value as in BEGIN_TRANS padding: any value (to be ignored)========================================== === OUTPUT SIDE (correcttransactions) === ========================================== 7.BEGIN_TRANS [1 line] ============== status = 8′b00000001 // BEGIN_TRANSdata = { label[23:0], padding[39:0] } where:  label: transaction ID,copied from input's BEGIN_TRANS  padding: all 40 zero bits 8. AAD-RESSECTION ================== [this section is absent if prms[1]==0,otherwise it has the same number of lines, as in input AAD section, 0 isalso possible] (Note: bit ordering--Bit 0 at the rightmost position tomatch GCM testcases.) lines 1 to (last−1): status = 8′b00001100 //RESULT_0, last=0, aux=0 res = (64 bits) last line (64-bit case): status= 8′b00011100 // RESULT_0, last=1, aux=0 res = (64 bits) last line (8 to56 bit cases): status = { len[2:0], 5′b11100 } // RESULT_0, last=1,aux=len res = (8*len bits) // len=1...7, // padding all zeroes at therightmost, i.e. // least significant bits) 9. RESULT SECTION================= [this section is absent if prms[2]==0, otherwise ithas the same number of lines, as in input DATA section, 0 is alsopossible] (Note: bit ordering--Bit 0 at the rightmost position to matchGCM testcases.) lines 1 to (last−1): status = 8′b00001101 // RESULT_1,last=0, aux=0 res = (64 bits) last line (64-bit case): status =8′b00011101 // RESULT_1, last=1, aux=0 res = (64 bits) last line (8 to56 bit cases): status = { len[2:0], 5′b11101 } // RESULT_1, last=1,aux=len res = (8*len bits) // len=1...7, // padding all zeroes at therightmost, i.e. // least significant bits) 10. TAG SECTION=============== [this section is absent if prms[3]==0, otherwise it has2 lines] (Note: bit ordering--Bit 0 at the rightmost position to matchGCM testcases.) line 1: status = 8′b00001000 // TAG_0, last=0, aux=0 res= TAG[127:64] line 2: status = 8′b00011000 // TAG_0, last=1, aux=0 res =TAG[63:0] 11. END_TRANS [1 line] ============= status = 8′b00000010 //END_TRANS res = { label[23:0], padding[39:0] } where:  label:transaction ID, copied from input's BEGIN_TRANS  padding: all 40 zerobits ============================================ === OUTPUT SIDE(incorrect transactions) =============================================== Incorrect transactionstarts in the same way as correct one. But its lines may end at anymoment (break inside a section without reaching line with last=1 is alsopossible). The last output line of the incorrect transaction isERR_END_TRANS instead of END_TRANS, where: 12. ERR_END_TRANS [1 line]================= status = 8′b10000010 // ERR_END_TRANS res = {label[23:0], padding[39:0] } where:  label: transaction ID, copied frominput's BEGIN_TRANS  padding: all 40 zero bits============================================ === ERROR CODES (fromINTERNAL_DIAG bus) === ============================================ 0 noerrors (if ABORT=0) or transaction labels mismatch (if ABORT=1) 1continue to wait for break combination after error detection 2 too longkey (no LAST=1 in first 4 lines of key section) 4 unexpected LAST=1 inkey section 6 unexpected LAST=1 in IV section 7 other protocolviolations (i.e. either wrong order of sections or a section withoutLAST=1) Error codes 2...7 will be activate only during one clock cycle,then they will be followed by code 1.

The foregoing description of the invention has been presented forpurposes of illustration and description. It is not intended to beexhaustive or to limit the invention to the precise form disclosed, andother modifications and variations may be possible in light of the aboveteachings. The embodiment was chosen and described in order to bestexplain the principles of the invention and its practical application tothereby enable others skilled in the art to best utilize the inventionin various embodiments and various modifications as are suited to theparticular use contemplated. It is intended that the appended claims beconstrued to include other alternative embodiments of the inventionexcept insofar as limited by the prior art.

What is claimed is:
 1. A cryptographic hardware system, comprising: aplurality of input slots that receive cipher independent cryptographictransactions; a first wrapped cipher block that includes firsttranslation hardware that receives cipher independent cryptographictransactions and sends first cipher dependent transactions to firstcipher hardware, said first translation hardware translating said cipherindependent cryptographic transactions to said first cipher dependenttransactions and translates first cipher dependent result transactionsreceived from said first cipher hardware to cipher independent resulttransactions, said first translation hardware not encrypting and notdecrypting information received in said cipher independent cryptographictransactions, said cipher independent cryptographic transactionsunsuitable for processing by said first cipher hardware, the firsttranslation hardware outputting, to said first cipher hardware, firstcipher dependent transactions having at least one of a first bitordering, and a first command sequence that are different from thecipher independent cryptographic transactions; and, a first output FirstIn First Out (FIFO) having a plurality of slots that receive said cipherindependent result transactions associated with said first wrappedcipher block; further comprising: a second wrapped cipher block thatincludes second˜translation hardware that receives cipher independentcryptographic transactions and sends second cipher dependenttransactions to said second cipher hardware, said second translationhardware translating said cipher independent cryptographic transactionsto said second cipher dependent transactions and translates secondcipher dependent result transactions received from said second cipherhardware to cipher independent result transactions, said secondtranslation hardware not encrypting and not decrypting informationreceived in said cipher independent cryptographic transactions, saidcipher independent cryptographic transactions unsuitable for processingby said second cipher hardware, the second translation hardwareoutputting, to said second cipher hardware, said second cipher dependenttransactions having at least one of a second bit ordering and a secondcommand sequence that are different from said first cipher dependenttransactions; wherein said wrapped cipher block sends said first cipherdependent transactions to said first cipher hardware using cipherdependent timing.
 2. The system of claim 1, further comprising: an inputswitch that receives cipher independent cryptographic transactions andsends cipher independent cryptographic transactions to said firstwrapped cipher block and said second wrapped cipher block.
 3. The systemof claim 2, further comprising: an output switch that receives cipherindependent result transactions from first wrapped cipher block sendscipher independent result transactions associated with said firstwrapped cipher block to said first output FIFO and sends cipherindependent result transactions associated with said second wrappedcipher block to a second output FIFO.
 4. The system of claim 3, furthercomprising: a dispatch unit that controls said input switch and saidoutput switch.
 5. The system of claim 4, wherein said dispatch unitcontrols said input switch, said output switch, said first wrappedcipher block, and said second wrapped cipher block such that said firstcipher hardware and said second cipher hardware perform cryptographicfunctions in parallel.
 6. The system of claim 1, wherein said firstcipher hardware and said second cipher hardware implement a firstcipher.
 7. The system of claim 1, wherein said first cipher hardwareimplements a first cipher and said second cipher hardware implements asecond cipher.
 8. A method of providing cryptographic services,comprising: receiving cipher independent cryptographic transactions;receiving said cipher independent cryptographic transactions into afirst wrapped cipher block that includes first translation hardware andfirst cipher hardware; translating, by said first translation hardware,said cipher independent cryptographic transactions to first cipherdependent transactions, said first translation hardware not encryptingand not decrypting information received in said cipher independentcryptographic transactions, said cipher independent cryptographictransactions unsuitable for processing by said first cipher hardware,the first translation hardware outputting, to said first cipherhardware, said first cipher dependent transactions having at least oneof a first bit ordering and a first command sequence that are differentfrom the cipher independent cryptographic transactions; sending firstcipher dependent transactions to said first cipher hardware; translatingfirst cipher dependent result transactions received from said firstcipher hardware to cipher independent result transactions; and,receiving said cipher independent result transactions into a firstoutput First In First Out (FIFO); further comprising: receiving cipherindependent cryptographic transactions into a second wrapped cipherblock that includes second translation hardware and second cipherhardware; translating, by said second translation hardware, said cipherindependent cryptographic transactions to second cipher dependenttransactions, said cipher independent cryptographic transactionsunsuitable for processing by said second cipher hardware, the secondtranslation hardware outputting, to said second cipher hardware, saidsecond cipher dependent transactions having at least one of a second bitordering and a second command sequence that are different from the firstcipher dependent transactions; sending second cipher dependenttransactions to said second cipher hardware; and, translating secondcipher dependent result transactions received from said second cipherhardware to cipher independent result transactions; wherein said firstcipher hardware and said second cipher hardware having different timingrequirements.
 9. The method of claim 8, wherein said step of sendingfirst cipher dependent transactions sends said first cipher dependenttransactions to said first cipher hardware using cipher dependenttiming.
 10. The method of claim 8, wherein said first cipher hardwareand said second cipher hardware perform cryptographic functions inparallel.
 11. The method of claim 8, wherein said cipher independentcryptographic transactions are specified without timing information. 12.The method of claim 8, wherein said first cipher hardware and saidsecond cipher hardware implement a first cipher.
 13. The method of claim8, wherein said first cipher hardware implements a first cipher and saidsecond cipher hardware implements a second cipher.